export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8

# 查看

../bin/docker images

# 导入带预装包镜像
../bin/docker load -i centos7.8.tar

mkdir -p /home/test/package
# ../bin/docker run -d --network host --env="DISPLAY" --env="QT_X11_NO_MITSHM=1" --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" --mount type=bind,source=/home/test/package,target=/home/test/package -it --name pycharm 4e0b79774df2

# 使用本地网络 host

../bin/docker run -d --network host  --hostname mygit --mount type=bind,source=/home/test/package,target=/home/test/package -it --name git 8b28e63d9286

../bin/docker exec -it git /bin/bash

# echo "185.150.189.29 github.com" >> /etc/hosts

# 更换源

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all
yum makecache

# 安装git

yum install cifs-utils
yum install glibc-devel.i686
yum instal file
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | bash
yum install git-lfs

ssh-keygen

git clone git@xxx.git

# 图形界面？？？
yum install xorg-x11-xauth xorg-x11-server-utils xorg-x11-server-Xnest libXi libXp libXtst
yum install -y xorg-x11-server-Xvfb
yum install -y libXfont xorg-x11-fonts*
Xvfb :99 -screen 0 1024x768x24 &
export DISPLAY=:99
xvfb-run [your_command]

xhost +local:root  # 允许本地root连接
